using System;
using GraphEditor.Runtime;

namespace GraphEditor.Sample.StateMachine.Runtime
{
    /// <summary>
    /// 状态类
    /// </summary>
    public abstract class State : IElement
    {
        public string Id { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }

        public void Enter(StateMachine stateMachine)
        {
            OnEnter(stateMachine);
        }

        public void Update(StateMachine stateMachine)
        {
            OnUpdate(stateMachine);
        }

        public void Exit(StateMachine stateMachine)
        {
            OnExit(stateMachine);
        }

        protected virtual void OnEnter(StateMachine stateMachine)
        {

        }

        protected virtual void OnUpdate(StateMachine stateMachine)
        {

        }

        protected virtual void OnExit(StateMachine stateMachine)
        {

        }
    }

    public class MoveState : State
    {

    }

    public class TestState : State
    {

    }
}